Want to integrate Graph API with the Azure app for sending messages to the team's users uisng email

ghulam murtaza 0 Reputation points
2023-05-03T06:12:02.02+00:00

I want to send messages on Microsoft Teams using user email.

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
9,262 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,874 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. CarlZhao-MSFT 37,871 Reputation points
    2023-05-03T09:08:38.12+00:00

    Hi @ghulam murtaza

    Sending messages in team channels on behalf of other users in the organization is currently not supported, only on behalf of logged-in users, because application permissions are only available in migration, you need to create the team and channel in the migration state:

    User's image

    Import messages:

    POST https://graph.microsoft.com/v1.0/teams/team-id/channels/channel-id/messages
    
    {
       "createdDateTime":"2019-02-04T19:58:15.511Z",
       "from":{
          "user":{
             "id":"id-value",
             "displayName":"Joh Doe",
             "userIdentityType":"aadUser"
          }
       },
       "body":{
          "contentType":"html",
          "content":"Hello World"
       }
    }
    

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.